package pl.minim.unidefCMS.objects {
	import flash.net.FileFilter;
	import flash.net.URLRequest;	

	/**
	 * @author Marek Brun
	 */
	public class UnidefFile extends AbstractUnidefObject {
		
		public var url:URLRequest=new URLRequest();
		public var filter:FileFilter;

		public function UnidefFile() {
			
		}
		
		override public function getTypeName():String {
			return 'File';
		}
		
		override public function getDataAsTextPreview():String {
			return url.url;
		}
		
		override public function toXML():XML {
			var xml:XML=<i/>;
			xml.appendChild(url.url);
			return xml;
		}
		
		override public function exportToRawData():* {
			return new URLRequest(url.url);
		}
		
	}
}
